package com.zm.demo.shoppingmall.common.response;

import lombok.Data;

/**
 * @desc:
 * @author: z01140
 * @date: 2021/5/25 10:22
 */

@Data
public class ShoppintMallResponse {

    //1=正常 0=异常
    private int code;

    private String message;

    private Object data;
    private ShoppintMallResponse(int code, String message, Object data){
        this.message = message;
        this.code = code;
        this.data = data;
    }
    public static ShoppintMallResponse response(int code, String message, Object data){
        return new ShoppintMallResponse(code, message, data);
    }

    public static ShoppintMallResponse response(int code, String message){
        return new ShoppintMallResponse(code, message, null);
    }

}
